package com.smart.common.exception;

import com.smart.common.vo.ResponseEnumCode;
import lombok.Data;

@Data
public class BaseException extends RuntimeException {
    private Integer status;
    private String msg;
    private ResponseEnumCode responseEnumCode;

    public BaseException(Integer status, String message) {
        super(message);
        this.status = status;
    }

    public BaseException(ResponseEnumCode responseEnumCode) {
        this.responseEnumCode = responseEnumCode;
        this.msg = responseEnumCode.getMsg();
        this.status = responseEnumCode.getStatus();
    }

}
